﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FckTemplets.aspx.cs" Inherits="PlugNT.Cms.Web.Admin.Pre_Systems.FckTemplets" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Fck模板文件更新</title>
<link href="../css/control.css" rel="stylesheet" type="text/css" media="all" />
<script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
    function Submit(sid, action) {
        if (window.confirm("确定要执行吗？")) {
            document.location.href = "?action=" + action
            + "&title=" + $("#txtTitle" + sid).val()
            + "&image=" + $("#txtImage" + sid).val()
            + "&description=" + $("#txtDescription" + sid).val()
            + "&html=" + $("#txtHtml" + sid).val();
        }
    }
    function SwapColor(obj, flag) {
        obj.style.backgroundColor = flag ? "#ECF5FF" : "#F4FBFF";
    }
</script>
</head>
<body>

<div class="frmstatic" style="display:block;">
    <span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
    <div class="nav_menu">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td align="left">
                <table>
                    <tr>
                        <td><img src="../images/main_home.gif" width="16" height="16" /></td>
                        <td><label>设置&nbsp;&gt;&nbsp;模板管理&nbsp;&gt;&nbsp;编辑器模板</label></td>
                    </tr>
                </table>
            </td>
            <td align="right">
                <table>
                    <tr>
                        <td><img src="../images/arrow_left.png" width="16" height="16" /></td>
                        <td><label><a href="javascript:window.history.back();" class="sub_menu">返回</a></label></td>
                    </tr>
                </table>
            </td>
          </tr>
        </table>
    </div>
    <span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px;"></span>
</div>


<div class="frmstatic" style="display:block; margin-top:10px;">
<form id="form1" runat="server">
<span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
<div class="controls">
     
             
             <table id="fcktab" width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ecf5ff">
                <tr align="center" onmouseover="SwapColor(this,true);" onmouseout="SwapColor(this,false);" style="background-color:#F4FBFF;"> 
                  <td align="left" nowrap>
                    <table width="100%" border="0">
                        <tr>
                            <td width="145" align="right">标题：</td>
                            <td><input id="txtTitle0" type="text" style="width:150" /></td>
                            <td align="right">图片：</td>
                            <td><input id="txtImage0" type="text" style="width:300" /></td>
                        </tr>
                        <tr>
                            <td align="right">描述：</td>
                            <td colspan="3"><textarea id="txtDescription0" style="width:90%" rows="3"></textarea></td>
                        </tr>
                        <tr>
                            <td align="right">内容：</td>
                            <td colspan="3"><textarea id="txtHtml0" style="width:90%" rows="8"></textarea></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="3">
                            <input class="bt" type="button"  value=" 添加 " onclick="Submit('0','add');" />
                            <input class="bt" type="button" value=" 还原 " onclick="Submit('0','restore');" /> 
                            </td>
                        </tr>
                    </table>
                  </td>
                </tr>
             <asp:Repeater ID="rptAdmin" runat="server">
              <ItemTemplate>
                <tr align="center" onmouseover="SwapColor(this,true);" onmouseout="SwapColor(this,false);" style="background-color:#F4FBFF;"> 
                  <td align="left" nowrap>
                    <table width="100%" border="0">
                        <tr>
                            <td width="145" align="right">标题：</td>
                            <td><input id="txtTitle<%#Eval("id") %>" type="text" style="width:150" value="<%#Eval("title") %>" disabled="true" /></td>
                            <td align="right">图片：</td>
                            <td><input id="txtImage<%#Eval("id") %>" type="text" style="width:300" value="<%#Eval("image") %>" /></td>
                        </tr>
                        <tr>
                            <td align="right">描述：</td>
                            <td colspan="3"><textarea id="txtDescription<%#Eval("id") %>" style="width:90%" rows="3"><%#Eval("description")%></textarea></td>
                        </tr>
                        <tr>
                            <td align="right">内容：</td>
                            <td colspan="3"><textarea id="txtHtml<%#Eval("id") %>" style="width:90%" rows="8"><%#Eval("html")%></textarea></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="3">
                            <input class="bt" type="button" value=" 编辑 " onclick="Submit('<%#Eval("id") %>','edit');" />
                            <input class="bt" type="button" value=" 删除 " onclick="if(window.confirm('确定删除 [<%#Eval("title") %>] 吗?')){Submit('<%#Eval("id") %>','delete');}" />
                            </td>
                        </tr>
                    </table>
                  </td>
                </tr>
              </ItemTemplate>
             </asp:Repeater>
             <tr>
                <td align="left" style="background-color:#F4FBFF;">
                    <table width="100%" border="0">
                        <tr>
                            <td width="145" align="right"></td>
                            <td>提示：<span style="color:#ff0000; line-height:25px;">编辑器有新模板时需要清除ie缓存才能看到新添加的模板。</span></td>
                        </tr>
                        <tr>
                    </table>
                </td>
             </tr>
             </table>
      
</div>
<span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px;"></span>
</form>
</div>

</body>
</html>
